<script>
    function stringify(obj) {
        let arr = []
        for (let key in obj) {
            let val = obj[key]
            if (!['boolean', 'number'].includes(typeof val)) {
                val = `"${obj[key]}"`
            }
            arr.push(`"${key}":${val}`)
        }
        return `{${arr.join(',')}}`
    }
</script>